package com.jiayou.im.config

import com.jiayou.im.filter.LoginFilter
import org.springframework.beans.factory.annotation.Autowired
import org.springframework.context.annotation.Configuration
import org.springframework.web.servlet.config.annotation.InterceptorRegistry
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer

/**
@author 李 双
@data   2020-11-20  16:44
@info
 */
@Configuration
open class MvcConfig : WebMvcConfigurer {
    @Autowired
    private lateinit var loginFilter: LoginFilter
    override fun addInterceptors(registry: InterceptorRegistry) {
        registry.addInterceptor(loginFilter).addPathPatterns("/**")
    }
}